// 引入mockjs
import homeData from './home'
import goods from './goods'
import userData from './user'
const Mock = require('mockjs')

// Mock.mock( url, post/get , 返回的数据)；

// home
Mock.mock('/api/home', 'get', homeData)

// goods
Mock.mock('/api/goods/category', 'get', goods.category)
Mock.mock('/api/goods/brand', 'get', goods.brand)
Mock.mock('/api/goods/goodsLabel', 'get', goods.goodsLabel)
Mock.mock('/api/goods/supplier', 'get', goods.supplier)
Mock.mock('/api/goods/tableData', 'post', goods.tableData)
Mock.mock('/api/goods/submit', 'post', goods.submitData)

// user
Mock.mock('/api/login', 'post', userData.loginData)
Mock.mock('/api/logout', 'post', userData.logout)
Mock.mock(RegExp('/api/user*'), 'get', userData.userInfo)
